package acttest.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import acttest.dao.BaseDao;
import acttest.dao.UserDao;
import acttest.entity.User;

@Repository
public class UserDaoImpl implements UserDao {
	
	@Autowired
	BaseDao<User> baseDao;
	
	public void persist(User t) {
		baseDao.persist(t);
	}

	public List<User> query(String sql, Class<User> clazz) {
		return baseDao.query(sql, User.class);
	}

	public List<User> query(String sql, Object[] args, Class<User> clazz) {
		return baseDao.query(sql, args, User.class);
	}

	public List<User> queryForList(String sql, Class<User> clazz) {
		return baseDao.queryForList(sql, User.class);
	}

	public List<Map<String, Object>> queryForList(String sql) {
		return baseDao.queryForList(sql);
	}

	public List<Map<String, Object>> queryForList(String sql, Object[] args) {
		return baseDao.queryForList(sql, args);
	}

	public void excute(String sql) {
		baseDao.excute(sql);
	}

	public List<?> getNamedQuery(String named) {
		return baseDao.getNamedQuery(named);
	}

	public User find(Object id, Class<User> clazz) {
		return baseDao.find(id, User.class);
	}

	public void remove(User t) {
		baseDao.remove(t);
	}

	public int update(String sql) {
		return baseDao.update(sql);
	}

}
